package com.fs.controller.vo.purchase;

import com.fs.service.bo.purchase.BoPurchaseWithRoomAndCustomer;
import com.fs.utils.Utils;
import lombok.Getter;
import lombok.Setter;


@Getter
public class RespPurchase {
    private final Integer id;
    private final float amount;
    private final String beginDateTime;
    private final String endDateTime;
    private final String roomName;
    private final String tradeNo;

    public RespPurchase(BoPurchaseWithRoomAndCustomer bo){
        id=bo.getId();
        amount=bo.getAmount();
        beginDateTime= Utils.localDateTimeToString(bo.getBeginTime());
        endDateTime = Utils.localDateTimeToString(bo.getEndTime());
        roomName=bo.getRoom().getName();
        tradeNo=bo.getTradeNo();
    }
}
